package com.frain.springcloud.user.entity;

import java.io.Serializable;
import java.util.List;

public class UserInfo implements Serializable {

    /** 
     * @Fields serialVersionUID : 
     */
    private static final long serialVersionUID = -1863228122334685684L;

    private String openid;

    private String nickname;

    private String sex;

    private String province;

    private String city;

    private String country;

    private String headimgurl;

    private List<String> privilege;
    private String unionid;

    public String getOpenid() {
        return openid;
    }

    public void setOpenid(String openid) {
        this.openid = openid;
    }

    public String getNickname() {
        return nickname;
    }

    public void setNickname(String nickname) {
        this.nickname = nickname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getProvince() {
        return province;
    }

    public void setProvince(String province) {
        this.province = province;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getCountry() {
        return country;
    }

    public void setCountry(String country) {
        this.country = country;
    }

    public String getHeadimgurl() {
        return headimgurl;
    }

    public void setHeadimgurl(String headimgurl) {
        this.headimgurl = headimgurl;
    }

    public List<String> getPrivilege() {
        return privilege;
    }

    public void setPrivilege(List<String> privilege) {
        this.privilege = privilege;
    }

    public String getUnionid() {
        return unionid;
    }

    public void setUnionid(String unionid) {
        this.unionid = unionid;
    }

    public static UserInfo defaultUser(String openId) {
        UserInfo userInfo = new UserInfo();
        userInfo.setOpenid(openId);
        userInfo.setCity("");
        return userInfo;
    }

    @Override
    public String toString() {
        return "UserInfo [openid=" + openid + ", nickname=" + nickname + ", sex=" + sex + ", province=" + province
                + ", city=" + city + ", country=" + country + ", headimgurl=" + headimgurl + ", privilege=" + privilege
                + ", unionid=" + unionid + "]";
    }

}
